home *** CD-ROM | disk | FTP | other *** search
/ Amoszine 7 / Amoszine 7 (Disk 3 of 3).adf / ARCHIVES / AZ_Accessories_Library.lha / killcomments.amos / killcomments.amosSourceCode
AMOS Source Code  |  1992-09-02  |  3KB  |  93 lines

  1. '     THE AMOSZINE CLASSIC ACCESSORIES LIBRARY   
  2. '     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 
  3. '  
  4. '     ACCS NO. : 2 
  5. '
  6. '     PROC NAME: Remove Comments   
  7. '
  8. '     ORIGIN   : Amos CD / Via Steve Bye   
  9. '
  10. '     AUTHOR   : ??      
  11. '
  12. '     UPDATER  : ANDY GIBSON 
  13. '
  14. '     PURPOSE  : Remove ALL comments from source code listings 
  15. '                      
  16. '     COMMENT  : It works only on the ' comment lines and not Rems ! 
  17. '                
  18.  
  19.  
  20. ' ===========================================================================
  21.  
  22.  
  23.  
  24. ' ***
  25. ' *** To run this source you need Amos Pro ! 
  26. ' *** It can only be used by doing the following : 
  27. ' *** Enter AMOS pull down menu and select LOAD ACCESSORY
  28. ' *** Load this file 
  29. ' *** Now load up any Amos Source you have into the editor as normal 
  30. ' *** Now if you want to get rid of all those comments, ya know the  
  31. ' *** ones that start with  '  just like this line does, then
  32. ' *** Enter AMOS pull down menu and select The new Accessory 
  33. ' *** program (should be in red text under heading ACCESSORIES.
  34. ' *** It will run through your Amos Source and remove ALL comments 
  35. ' *** that start with the  ' char !
  36. ' ***
  37. ' *** It does NOT remove any REMS !!!  Well blow me down  ;-)
  38. ' ***
  39. ' *** I don't know who wrote this file and I don't really care as I
  40. ' *** don't think anyone will have a use for it, but ya never know ! 
  41. ' *** After all, comments should be left in your listing to remind 
  42. ' *** you what a section of code does, but then again some people
  43. ' *** go over the top by commenting just about everything !
  44. ' *** (Ya should see the Az Engine source for a laugh !) 
  45. ' ***
  46. ' *** If you have any better Accessories, send them in to myself and 
  47. ' *** I'll include them on the next issue of Az. 
  48. ' ***
  49. ' *** There must be some goodies out there that I haven't seen yet.
  50. ' ***
  51. ' *** Andy Gibson for AZ issue 7.
  52. ' ***
  53. ' *** PS - Sorry, but this file was not commented and as I've never
  54. ' ***      delved into accessories, I can't be bothered to comment 
  55. ' ***      it  :(  It does work though as I've tested it - honest !
  56. ' ***
  57.  
  58.  
  59.  
  60.   Set Accessory 
  61.  
  62.   NUMLINES=5
  63.   _STARTLINE=11
  64.   RTCURRLINE=1
  65.   _TOPTEXT=17
  66.   _ENDTEXT=18
  67.   RT=1
  68.   CONTROL_Y=23
  69.   MOVECURSORUP=1
  70.  
  71.   Call Editor _TOPTEXT
  72.   Ask Editor NUMLINES
  73.  
  74.   N=Param : If Param=0 Then End 
  75.  
  76.   For A=1 To N
  77.   Call Editor _STARTLINE
  78.   Ask Editor RTCURRLINE
  79.   A$=Param$
  80.   B=0
  81.  
  82.   While B<>Len(A$) and Mid$(A$,B,1)<>Chr$(34)
  83.   Inc B
  84.   If Mid$(A$,B,1)="'"
  85.   Call Editor 30
  86.   Exit 
  87.   End If 
  88.   Call Editor 4
  89.   Wend 
  90.  
  91.   Call Editor 2
  92.  
  93.   Next